﻿using System;
using Shanfree.Framework.Utility;
using Shanfree.SharpMovie.BLL;

public partial class Admin_Register : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {

    }
    protected void btnComfirm_Click(object sender, EventArgs e)
    {
        try
        {
            string name = tbName.Text;
            string pwd = tbPwd.Text;
            string rpwd = tbrPwd.Text;
            string email = tbEmail.Text;
            string remail = tbrEmail.Text;
            string id = new User().Add(name, pwd, rpwd, email, remail);
            Session["UserInfo"] = new User().GetByID(id);
            Response.Redirect("", false);
        }
        catch (ArgumentException ax)
        {
            // 显示到页面
            // TODO：
        }
        catch (Exception ex)
        {
            LogEntry.Log.Write(ex.ToString(), LogSourceType.一般错误);
            // 显示到页面
            // TODO：
        }
    }
}
